package com.alibaba.bos.service.base.impl;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.bos.dao.base.AreaRepository;
import com.alibaba.bos.domain.base.Area;
import com.alibaba.bos.service.base.AreaService;
@Service
@Transactional
public class AreaServiceImpl implements AreaService {
   
    @Autowired
    private AreaRepository areaRepository;
    
    //批量导入
    @Override
    public void saveBatch(List<Area> areas) {
        areaRepository.save(areas);
    }
    
    //带条件扽也查询
    @Override
    public Page<Area> findPageData(Specification specification, Pageable pageable) {
        return areaRepository.findAll(specification,pageable);
    }

   /* @Override
    public List<Area> findAll() {
        // TODO Auto-generated method stub
        return areaRepository.findAll();
    }*/

}
